package com.fingard.dsp.bank;

import java.util.HashMap;
import java.util.Map;

/**
 * 存储指令（比如7506）和名称（Balance）的映射关系，
 * 通过报文中的指令从容器中获取到对应的对象
 * @author Fantx
 * @version 1.0
 * @date 2020-07-21 9:19
 */
public class CommandNameMap {

    public static Map<String, String> commandAndNameMapping;

    static {
        commandAndNameMapping = new HashMap<>();
        //余额对账查询
        commandAndNameMapping.put("7508","BalCheckQry");
        //余额对账确认
        commandAndNameMapping.put("7509","BalanceCheckConfirm");
        //批量付款
        commandAndNameMapping.put("1988","BatPayRec");
        commandAndNameMapping.put("1998","BatPayRec");
        commandAndNameMapping.put("9188","BatPayRec");
        commandAndNameMapping.put("9198","BatPayRec");
        //协议
        commandAndNameMapping.put("Contract","Contract");
        //存单
        commandAndNameMapping.put("7507","Deposit");
        //电票查询
        commandAndNameMapping.put("B001","ElecBill");
        commandAndNameMapping.put("B002","ElecBill");
        commandAndNameMapping.put("B004","ElecBill");
        commandAndNameMapping.put("B005","ElecBill");
        commandAndNameMapping.put("B006","ElecBill");
        commandAndNameMapping.put("B007","ElecBill");
        commandAndNameMapping.put("B008","ElecBill");
        commandAndNameMapping.put("B009","ElecBill");
        commandAndNameMapping.put("B010","ElecBill");
        commandAndNameMapping.put("B011","ElecBill");
        //电票操作
        commandAndNameMapping.put("B003","ElecBillTrans");
        commandAndNameMapping.put("B101","ElecBillTrans");
        commandAndNameMapping.put("B102","ElecBillTrans");
        commandAndNameMapping.put("B103","ElecBillTrans");
        commandAndNameMapping.put("B104","ElecBillTrans");
        commandAndNameMapping.put("B105","ElecBillTrans");
        commandAndNameMapping.put("B106","ElecBillTrans");
        commandAndNameMapping.put("B107","ElecBillTrans");
        commandAndNameMapping.put("B108","ElecBillTrans");
        commandAndNameMapping.put("B109","ElecBillTrans");
        commandAndNameMapping.put("B110","ElecBillTrans");
        commandAndNameMapping.put("B111","ElecBillTrans");
        commandAndNameMapping.put("B112","ElecBillTrans");
        commandAndNameMapping.put("B113","ElecBillTrans");
        commandAndNameMapping.put("B119","ElecBillTrans");
        //外币支付
        commandAndNameMapping.put("DomesticFCP", "ForeignCurrSinglePay");
        commandAndNameMapping.put("CrossborderFCSQ", "ForeignCurrSinglePay");
        commandAndNameMapping.put("OutsideFCSQ", "ForeignCurrSinglePay");
        //开证相关
        commandAndNameMapping.put("LCIssueApp", "ImportLC");
        commandAndNameMapping.put("LCIssueAppEdit", "ImportLC");
        commandAndNameMapping.put("DisConfirm", "ImportLC");
        commandAndNameMapping.put("OrderHonour", "ImportLC");
        commandAndNameMapping.put("OrderHonourEdit", "ImportLC");
        commandAndNameMapping.put("OrderPay", "ImportLC");
        commandAndNameMapping.put("Dishonor", "ImportLC");
        commandAndNameMapping.put("ChargeBackApply", "ImportLC");
        //Other
        commandAndNameMapping.put("PosQuery", "OtherElse");
        commandAndNameMapping.put("PosNotify", "OtherElse");
        //结汇购汇
//        commandAndNameMapping.put("PurchaseFCP", "PurchaseExchange");
//        commandAndNameMapping.put("SettleFCSQ", "PurchaseExchange");
        //退票查询
        commandAndNameMapping.put("5001", "PurchaseExchange");
        commandAndNameMapping.put("REFUNDTICKET", "PurchaseExchange");
        //单笔实时代扣
        commandAndNameMapping.put("9108", "RealTime");
        commandAndNameMapping.put("9144", "RealTime");
        //电子回单
        commandAndNameMapping.put("DOWNLOADRECEIPTPRO", "ReceiptPro");
        commandAndNameMapping.put("DOWNLOADRECEIPT", "Receipt");
//        //结汇购汇
//        commandAndNameMapping.put("DOWNLOADRECEIPT", "Receipt");
        //对账单查询
        commandAndNameMapping.put("QryStatement", "Statement");
        //明细
        commandAndNameMapping.put("7515","Transaction");
        commandAndNameMapping.put("7516","Transaction");
        //余额
        commandAndNameMapping.put("7505","Balance");
        commandAndNameMapping.put("7506","Balance");
        //单笔支付
        commandAndNameMapping.put("1908","SinglePay");
        commandAndNameMapping.put("1944","SinglePay");
        commandAndNameMapping.put("1908BAT","SinglePay");
        commandAndNameMapping.put("1944BAT","SinglePay");
        //单笔代扣（全额、差额）
        commandAndNameMapping.put("9208","Withhold");
        commandAndNameMapping.put("9288","Withhold");
        commandAndNameMapping.put("9244","Withhold");
    }

}
